<template>
  <el-space>
    <el-input-number
        v-bind="inputInfo.inputAttrs"
        v-model="value"
        @input="$emit('update:modelValue', value)"
      />
    <span v-if="inputInfo.unit">{{inputInfo.unit}}</span>
  </el-space>
</template>

<script>
import { defineComponent, ref } from "vue";

export default defineComponent({
  name: "CommonInputNumber",
  props: {
    inputInfo: {
      type: Object,
      default: {},
    },
  },
  setup(props) {
    return {
      value: ref(props.inputInfo.value),
    };
  },
});
</script>

<style>
</style>